<template>
  <div>
    <header>
      <comp-header>
        <template>
          <img src="../assets/image/Logo.png" alt="" />
        </template>
      </comp-header>
    </header>
    <div class="banner"><comp-banner :banner="banner"></comp-banner></div>
    <comp-menus :menus="menus"></comp-menus>
    <comp-news :eznews="eznews"></comp-news>
    <comp-choose :choose="choose"></comp-choose>
    <comp-bast :bastBanner="bastBanner" :bastList="bastList"></comp-bast>
  </div>
</template>

<script>
import { get, post } from "../../utils/util";
import compHeader from "../components/compHeader.vue";
import compBanner from "../components/compBanner.vue";
import compMenus from "../components/pagehome/compMenus.vue";
import compNews from "../components/pagehome/compNews.vue";
import compChoose from "../components/pagehome/compChoose.vue";
import compBast from "../components/pagehome/compBast.vue";
import Vue from "vue";
import { Toast } from "vant";
Vue.use(Toast);
export default {
  name: "pageHome",
  data() {
    return {
      banner: null,
      menus: null,
      eznews: null,
      choose: null,
      bastBanner: null,
      bastList: null,
    };
  },
  components: {
    "comp-header": compHeader,
    "comp-banner": compBanner,
    "comp-menus": compMenus,
    "comp-news": compNews,
    "comp-choose": compChoose,
    "comp-bast": compBast,
  },
  created() {
    get("/index").then((res) => {
      console.log(res);
      
      this.banner = res.data.benefit;
      this.menus = res.data.menus;
      this.eznews = res.data.roll;
      this.choose = res.data.info.fastList;
      this.bastBanner = res.data.info.bastBanner;
      this.bastList = res.data.info.bastList;
    });
  },
};
</script>

<style lang="scss" scoped>

</style>